how to make auth in php api